var tabGroup = Titanium.UI.createTabGroup();

var search = Titanium.UI.createWindow({  
    title:'Search',
    url:'ui/search.js',
    //backgroundImage:'sky.jpg',
    backgroundColor: '#13386c',
});

var AboutWindow = require('ui/about');
var about = new AboutWindow();

var searchtab = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Search',
    window:search
});

var abouttab = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'about',
    window:about
});


tabGroup.addTab(searchtab);  
tabGroup.addTab(abouttab);

tabGroup.open({transition: Titanium.UI.iPhone && Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});


Ti.App.addEventListener('gotResults', function(event) {
  Ti.API.info('You sent me: '+event.resultsText);
  var resultwin = Titanium.UI.createWindow({
        url:'ui/results.js',
        title:'Results',
        hideNavBar:false
    });
    resultwin.resultsText = event.resultsText;
	searchtab.open(resultwin,{animated:true});
});